<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let s = new Set();
        console.log('s.size:', s.size);// 0
        s.add(1);
        s.add('a').add(1);//add可以链式调用
        console.log('变更后s.size:',s.size);// 2
        s.delete(1);
        console.log('变更后s.size:',s.size);// 1
        console.log(s.has(1));
        s.clear();
        console.log('s.size:',s.size);// 0
    </script>
</body>
</html>